<ion-view>
    <ion-header-bar align-title="center" class="headbar bar-header bar-clear">
    <a nav-direction="back" nav-transition="ios" class="button icon ion-ios-arrow-left button-clear " ng-href="#/main/amap" target="_self"> </a>

        <h1 class="title">驾驾</h1>
        <!--<ion-spinner icon="android" ng-hide="$root.currentUser || $root.loggingIn"></ion-spinner>-->
    </ion-header-bar>
    <ion-content has-header="true" scroll="true" scrollbar-y="false" ng-hide="$root.currentUser || $root.loggingIn">
        <div class="logined">
            <div class="card logo"><img style="width:200px; height:200px" src='/logo.jpg'/></div>
            <div class="card" style="background-color: rgba(255, 255, 255, 0.21);">
                <div class="list list-insert">
                    <label class="par item item-input">
                        <input type="text" style="font-size: 16px;color: aliceblue;" ng-model="info.username"
                               placeholder="手机号">
                    </label>
                    <label class="par item item-input">
                        <input type="password" style="font-size: 16px;color: aliceblue;" ng-model="info.password"
                               placeholder="密码">
                    </label>
                </div>
            </div>
            <button class="logining button button-calm button-block" ng-click="login()"> 登录</button>
            <div class="mords">
            <span class="text-left"><a ng-click="found()"  > 忘记密码？ </a></span>
            <span class="text-right"><a ng-href="#/register" target="_self" > 我要注册 </a></span>
            </div>
            
        </div>
    </ion-content>
    <ion-content has-header="true" scroll="true" scrollbar-y="false" ng-show="$root.currentUser || $root.loggingIn">
        <ion-list>
            <div class="card logo">
                <img style="width:200px; height:200px" ng-if="$root.currentUser.images.face" ng-src="{{$root.currentUser.images.face}}">
                <img style="width:200px; height:200px" ng-if="!$root.currentUser.images.face" src='/user.png'/>
            </div>            
            <label class="item item-input haslogined"> 账户 : {{ $root.currentUser.username}} </label>

            

            <ul class="list" ng-if="isDriver()">
                <li class="item item-toggle"
                    style="border: none; background: rgba(255, 255, 255, 0.3);margin:10px auto; color: #F4EE30;">
                    对乘客可见
                    <label class="toggle toggle-royal">
                        <input type="checkbox" ng-model="$root.currentUser.show">

                        <div class="track">
                            <div class="handle"></div>
                        </div>
                    </label>
                </li>
            </ul>

            <button class="logining button button-calm button-block" ng-click="logout()"> 退出登录</button>


        </ion-list>
        <div class="mords">
            <span class="text-left"><a ng-click="found()"  > 重设密码 </a></span>
            
            </div>
    </ion-content>
</ion-view>
